package svc

import (
	"github.com/minio/minio-go/v7"
	"yangming-college/app/general/cmd/v1/api/internal/config"
	"yangming-college/common/initialize"
)

type ServiceContext struct {
	Config      config.Config
	MinioClient *minio.Client
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		MinioClient: initialize.MinioInit(c.Minio.Endpoint, c.Minio.Username, c.Minio.Password, c.Minio.UseSSL),
	}
}
